from bouting.models import *
from django.contrib import admin

admin.site.register(WeaponRating)
admin.site.register(RefRating)
admin.site.register(Tournament)
#admin.site.register(Club)
admin.site.register(Division)
admin.site.register(Section)
#admin.site.register(UsfaCard)
#admin.site.register(Person)
admin.site.register(Event)
admin.site.register(Entrant)
admin.site.register(ListedReferee)
admin.site.register(Referee)
admin.site.register(Round)
admin.site.register(Cluster)
admin.site.register(Bout)
admin.site.register(Strip)
admin.site.register(Fencer)

class ClubAdmin(admin.ModelAdmin):
    list_display = ('name', 'abbreviation', )
admin.site.register(Club, ClubAdmin)

class PersonAdmin(admin.ModelAdmin):
    # ...
    fieldsets = [
        (None,               {'fields': ['firstName', 'lastName', 'gender', 'email', 'birthday', ]}),
        ('Clubs', {'fields': ['primaryClub', 'secondaryClub']}),
        ('MetaData', {'fields': ['account', 'createdBy', 'editedBy']}),
        #('Referee Ratings', {'fields': ['refFoilRating', 'refEpeeRating', 'refSaberRating']}),
    ]
    list_display = ('lastName', 'firstName', )
    
admin.site.register(Person, PersonAdmin)

class UsfaCardAdmin(admin.ModelAdmin):
    # ...
    fieldsets = [
        (None,               {'fields': ['person', 'number', 'division', 'verified']}),
        ('Dates',               {'fields': ['issueDate', 'expirationDate']}),
        ('Fencing Ratings', {'fields': ['fencingFoilRating', 'fencingEpeeRating', 'fencingSaberRating']}),
        ('Referee Ratings', {'fields': ['refFoilRating', 'refEpeeRating', 'refSaberRating']}),
        ('MetaData', {'fields': ['createdBy', 'editedBy']}),
    ]
    #list_display = ('lastName', 'firstName', )
    
admin.site.register(UsfaCard, UsfaCardAdmin)